<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
		<style>
		</style>
	</head>
	<body>
		<div id="box">
			<p class="old">{{str}}</p>
			<p class="new">{{newstr}}</p>
		</div>

		<script>
			new Vue({
				el: '#box',
				data: {
					str: '你好,我是黄倩'
				},
				// 计算属性
				computed: { //新值是一个方法
					newstr: function() {
						return this.str.split(',').join('???????????')
					}
				}
			})
		</script>
	</body>
</html>
